<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
echo "<h2>Обратная связь</h2>";
$this->table->set_heading('id', 'Имя', 'Дата', 'Действия');
$tmpl = array('table_open' => '<table border="0" cellpadding="0" cellspacing="0" class="admin_table">');
$this->table->set_template($tmpl);

$class = 'feedback';
if ($this->users_rights_model->check_rights($class, 'block', true)) $canblock = 1;
if ($this->users_rights_model->check_rights($class, 'unblock', true)) $canblock = 1;
if ($this->users_rights_model->check_rights($class, 'edit', true)) $canedit = 1;
if ($this->users_rights_model->check_rights($class, 'delete', true)) $candelete = 1;
if ($this->users_rights_model->check_rights($class, 'add', true)) $canadd = 1;

$parents[1] = 'Главные новости';
$parents[2] = 'События';

foreach ($pages as $page) {
	$this->table->add_row(
			$page['feedback_id'],
			"<a href='/admin/feedback/show/".$page['feedback_id']."/'>".$page['feedback_name']."</a>",
			showmedate($page['feedback_date']),
			showmeactions(
					$class,
					$page['feedback_id'],
					$page['feedback_status'],
					0, $candelete, 0,
					$from
				)
		);
}
echo $this->table->generate();
echo $paging;
echo "<div class='cc'></div>";
?>
